package xin.core.exception;

import lombok.Data;

/**
 * <pre>
 * Sys Base Exception
 * </pre>
 *
 * @author lixin_ma@outlook.com
 * @version 1.0
 * @since 2018/7/28 17:10
 */
@Data
public class BaseException extends RuntimeException {

    protected String code;

    protected String msg;

    public BaseException(String code,String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;

    }

    public BaseException(String message) {
        super(message);
    }

    public BaseException(String message, Throwable cause) {
        super(message, cause);
    }

    public BaseException(Throwable cause) {
        super(cause);
    }

    protected BaseException(String message, Throwable cause,
                            boolean enableSuppression,
                            boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}